{extend name="public/base"}
{block name="content"}
<div class="pst_bg">
    <div class="pst">
        当前的位置：
        {$location}&gt;{$desc}
    </div>
</div>
<div class="scd clearfix">
    <div class="scd_l">
        <div class="s_name">
            <img src="{$img}" width="138" height="48" alt="">
            <i>&nbsp;</i>
        </div>
    </div>
    <div class="scd_r">
        <div class="r_name"><span>{$desc}</span></div>
        <form id="form">
        <div class="book_m clearfix">
            <ul>
                <li>
                    <span class="name">联系姓名：</span>
                    <input name="name" type="text" id="nickname">
                </li>
                <li>
                    <span class="name">联系电话：</span>
                    <input name="tel" type="text" id="tel">
                </li>
            </ul>
            <ul>
                <li>
                    <span class="name">留言内容：<i>(*Required)</i></span>
                    <textarea name="content" cols="" rows="" id="content"></textarea>
                </li>
                <li>
                    <span class="name">&nbsp;</span>
                    <input type="button" value="提交">
                </li>
            </ul>
        </div>
        </form>
    </div>
</div>
{/block}
{block name='js'}
<script type="text/javascript">
    $(function () {
        var mark = '{$mark}';
        var menu = {$menu};
        var info = getMneu(mark,menu);
        $('.navbar-nav').append(info);

    });
    $('input[type=button]').click(function () {
        console.log();
        $.ajax({
            url : '/baibu/index/Index/contact',
            dataType : "json",
            type : "post",
            data : $('form').serialize(),
            success : function (data) {
                if(data.status){
                    layer.msg(data.msg,{icon:1,time:1200});
                    $('input[type=text]').val('');
                    $('textarea').val('');
                }else{
                    layer.msg(data.msg,{icon:2,time:1200});
                }
            }
        });
    });
</script>
{/block}